#ifndef CDATALINKFACTORY_H_
#define CDATALINKFACTORY_H_

#include <mutex>
#include <memory>
#include "IBaseDatalink.h"

namespace zl
{
namespace zlbase
{

class CDatalinkFactory
{
public:
	CDatalinkFactory() = default;
	~CDatalinkFactory() = default;

	std::shared_ptr<IBaseDatalink> Concreate(const DatalinkOption& opt);

protected:
	std::shared_ptr<IBaseDatalink> build_datalink(const DatalinkOption& opt);
	std::shared_ptr<IBaseDatalink> build_shared_datalink(const DatalinkOption& opt);
};

} // namespace zlbase
} // namespace zl

#endif // CDATALINKFACTORY_H_